﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DeVetma.admin.classes;
using DeVetma.admin.models.database.metadata;
using DeVetma.admin.models.database;
using DeVetma.admin.models.entities;

namespace DeVetma.admin.models.managers
{
    public class UserManager : DataManager<User>
    {
        public override string ensureKey(User entity)
        {
            return entity.uUsername;
        }

        public List<User> getAllByRole(string role)
        {
            return getAll().Where(q => q.uRole == role).ensure();
        }
    }
}